//
//  ZWCityDetailCollectionRV.m
//  WanEr
//
//  Created by 高文萍 on 15/12/18.
//  Copyright © 2015年 高文萍. All rights reserved.
//

#import "ZWCityDetailCollectionRV.h"
#import "WanErHeader.h"
#define FITHEIGHT [[UIScreen mainScreen] bounds].size.height / 667.0
@implementation ZWCityDetailCollectionRV
- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        self.imgView = [[UIImageView alloc]init];
//        self.imgView.backgroundColor = [UIColor cyanColor];
        [self addSubview:self.imgView];
        
        self.headLabel = [[UILabel alloc]init];
        self.headLabel.font = [UIFont systemFontOfSize:16];
//        self.headLabel.backgroundColor = [UIColor orangeColor];
        self.headLabel.textColor = [UIColor colorWithWhite:0.211 alpha:1.000];
        self.headLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.headLabel];
        
        self.downLabel = [[UILabel alloc]init];
//        self.downLabel.backgroundColor = [UIColor yellowColor];
        self.downLabel.font = [UIFont systemFontOfSize:14];
        self.downLabel.textColor = [UIColor colorWithRed:0.461 green:0.446 blue:0.418 alpha:1.000];
        [self addSubview:self.downLabel];
        
        self.downButton = [[UIButton alloc]init];
//        self.downButton.backgroundColor = [UIColor orangeColor];
        [self addSubview:self.downButton];
        
        self.lineView = [[UIView alloc]init];
        self.lineView.backgroundColor = [UIColor colorWithRed:0.461 green:0.446 blue:0.418 alpha:1.000];
        [self addSubview:self.lineView];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imgView.frame = CGRectMake(0, -230 * FITHEIGHT, WIDTH, 230 * FITHEIGHT);
    self.headLabel.frame = CGRectMake(0, 0, WIDTH, HEIGHT / 15);
    self.lineView.frame = CGRectMake(20,self.headLabel.frame.size.height, WIDTH - 40, 1);
    self.downLabel.frame = CGRectMake(20, self.headLabel.frame.size.height + 10, 100, 30);
    self.downButton.frame = CGRectMake(WIDTH - 15 - 100, self.headLabel.frame.size.height + 10, 100, 30);
}

@end
